<template>
  <div class="iframe">
    <el-dialog :fullscreen="isFullscreen=='true'" :custom-class="isFullscreen=='true' ? 'fullscreenHeight' : ''"
      :title="title" :visible.sync="showDialog" width="900px" @close="handleClose()">
      <iframe :src="'http://' + this.FWebViewIP + '/?' + xQurl" frameborder="0" style="width: 100%;height:100%"></iframe>
    </el-dialog>
  </div>

</template>

<script>
export default {
  // 接受父组件传递的值
  props: {
    xQurl: null,
    title: null,
    isFullscreen:[Boolean,String],
  },
  data() {
    return {
      showDialog: false,
      FWebViewIP: null,
    };
  },
  methods: {
    // 弹出框关闭后触发
    handleClose() {
      this.showDialog = false;
    },
  },
  created() {
    this.getConfigKey("f.web.view.ip").then((response) => {
      this.FWebViewIP = response.msg;
    });
  },
  watch: {
  },
};
</script>

<style >
.iframe .el-dialog__body {
  height: 580px;
  overflow: auto;
}

.fullscreenHeight .el-dialog__body {
  height: calc(100vh - 50px) !important;
  max-height: calc(100vh - 50px) !important;
  overflow: hidden;
}
</style>


